package com.macro.mall.controller;

import com.macro.mall.bean.entity.OdrOrderReason;
import com.macro.mall.common.api.CommonResult;
import com.macro.mall.constans.PathConstants;
import com.macro.mall.service.OdrOrderReasonService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * OdrOrderReason的路由接口服务
 * 
 * @author 
 *
 */
@Slf4j
@RestController
@RequestMapping(PathConstants.ODR_ORDRE_REASON)
@Api(value = "订单取消原因接口",tags = "订单取消原因接口")
public class OdrOrderReasonController {

	/** OdrOrderReasonService服务 */
	@Autowired
	private OdrOrderReasonService odrOrderReasonService;
	
	/**
	 * 插入OdrOrderReason属性不为空的数据方法
	 * @param
	 * @return
	 */
    @PostMapping(value = "/save")
    @ApiOperation(value = "订单取消原因保存", notes = "订单取消原因保存", position = 1)
	public CommonResult save(@ApiParam("请求报文") @RequestBody OdrOrderReason value) {
		return odrOrderReasonService.saveNotNull(value);
	}
	
}
